<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>{% block title %}Association Machete{% endblock %}</title>

	<script src="https://www.google.com/jsapi?key=ABQIAAAA8bCVXNx3wJu9Tsb1ogWnPBSCRev8DqEXxtwVfKHDYNYvOS8sABTy1MNXLruufFGcM-vqHJaF72zP8Q" type="text/javascript"></script>
	<script language="Javascript" type="text/javascript">
	    //<![CDATA[
	
	    //google.load("search", "1");
  		google.load("jquery", "1.5.1");
  		google.load("jqueryui", "1.8.16");
	
	  	google.load("webfont", "1");
	
	 	google.setOnLoadCallback(function() {
	    	WebFont.load({
	      	google: {
	        	families: [ 'Gloria Hallelujah' ]
	      	}});
	  	});
	  
	    function OnLoad() {
	      /*
	      // Create a search control
	      var searchControl = new google.search.SearchControl();
	
	      // Add in a full set of searchers
	      var localSearch = new google.search.LocalSearch();
	      searchControl.addSearcher(localSearch);
	      searchControl.addSearcher(new google.search.WebSearch());
	      searchControl.addSearcher(new google.search.VideoSearch());
	      searchControl.addSearcher(new google.search.BlogSearch());
	
	      // Set the Local Search center point
	      localSearch.setCenterPoint("New York, NY");
	
	      // Tell the searcher to draw itself and tell it where to attach
	      searchControl.draw(document.getElementById("searchcontrol"));
	
	      // Execute an inital search
	      searchControl.execute("Google");
	      */
	    }
	    google.setOnLoadCallback(OnLoad);
	
	    //]]>
    </script>

	<!-- include CSS always before including js -->
    <link type="text/css" rel="stylesheet" href="/media/css/main.css" />
	<link type="text/css" rel="stylesheet" href="/media/js/tn3/tn3.css"></link>
	<link type="text/css" rel="stylesheet" href="/media/css/jquery.wysiwyg.modal.css"></link>
	<!-- include tn3 plugin -->
	<script type="text/javascript" src="/media/js/tn3/jquery.tn3lite.min.js"></script>
	
	<!-- include rich text plugin -->
	<script type="text/javascript" src="/media/js/jquery.wysiwyg.js"></script>
	<script type="text/javascript" src="/media/js/wysiwyg.colorpicker.js"></script>
	<script type="text/javascript" src="/media/js/wysiwyg.image.js"></script>
	<script type="text/javascript" src="/media/js/wysiwyg.link.js"></script>
	<script type="text/javascript" src="/media/js/wysiwyg.table.js"></script>
	<link type="text/css" rel="stylesheet" href="/media/css/jquery.wysiwyg.css"></link>
	
  </head>
  <body>
	<div class="page-header">
		  {% if user.is_authenticated %}
		  	{% if user.is_superuser %}
		  		[<a href="/admin/admin_home">Administration</a>]{% endif %}
		    [<a href="{% url django.contrib.auth.views.logout %}">sign out</a>]
		    
		  	Hello {{ user.username }}! &nbsp;
		  {% else %}
		    [<a href="{% url django.contrib.auth.views.login %}">sign in</a>]
		  	[<a href="/accounts/create_user/">Create User</a>]
		  	
		    Hello World! &nbsp;
		  {% endif %}
	</div>

	<div class="page-body">
		<div class="page-menu">
    		
			<span class="page-menu-title">Category</span>
			<span class="page-menu-item"><a class="page-menu-item-link" href="/machete/">Accueil</a></span>
			<span class="page-menu-item"><a class="page-menu-item-link" href="/machete/page/">Page</a></span>
				
		
		  	{% if menu_categories %}
		  	
				{% for category in menu_categories %}
					<span class="page-menu-title">{{category.title}}</span>
					{% for page in category.pages %}
						<span class="page-menu-item"><a class="page-menu-item-link" href="/machete/page/{{page.pk}}/">{{page.title}}</a></span>
					{% endfor %}
				{% endfor %}
			{% endif %}
			
	  		{% block menu-admin %}{% endblock %}
		</div>
		
		<div class="page-content">
	  		{% block content %}{% endblock %}
		</div>
	</div>
	
	<div class="page-footer">
		<span class="page-footer-item">&#169;&nbsp;Association Machete</span>
	</div>
 </body>
</html>
